#ifndef GLDEVICEINDEXBUFFER_H
#define GLDEVICEINDEXBUFFER_H

#include "Framework/Prerequisites.h"
#include "Graphics/OpenGL/GLPrerequisites.h"
#include "Graphics/IDeviceIndexBuffer.h"

namespace tyro
{
	namespace Graphics
	{
		class GLDeviceIndexBuffer : public IDeviceIndexBuffer
		{
		public:

			GLDeviceIndexBuffer(IDeviceBufferManagerBase* mgr, VertexIndexType indexType, size_t numberIndecies);

			void WriteData(size_t memOffset, size_t length, const void* source);
			void ReadData(size_t memOffset, size_t length, void* destination);
			GLuint GetGLBufferID(void) const { return bufferId; }
			void* LockImpl(size_t offset, size_t length);
			void UnlockImpl( void );

		protected:

			GLuint	bufferId; 

		private:
		};
	}
}
#endif